/**
 * 检查指定Div容器下是否有编辑过的评论框
 * @param {HTMLDivElement} el
 */
export const checkDirty = (el) => {
  if (!el || !(el instanceof HTMLDivElement)) {
    return;
  }
  const editors = el.querySelectorAll('[data-has-draft="true"]');
  return editors.length;
};
